package deal;

import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

import js.CsvExport;

public class StopDataOfHis implements Runnable {
	private static Logger logger=LogManager.getLogger(StopDataOfHis.class);
	@Override
	public void run() {
		while(true){
			try {
                System.out.println("deal count:"+CsvExport.count+",get count:"+GetDataOfHis.count);

                if (CsvExport.count==GetDataOfHis.count && CsvExport.flag) {
              	  long endTime=System.currentTimeMillis();
				      logger.info("*******总耗时" + (endTime - CsvExport.startTime) / 1000+"秒*****************");
				      CsvExport.exit = true;
				      break;
				}
                Thread.sleep(10000);
             } catch (InterruptedException e) { }
		}
	}

}
